import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/index',
    name: 'index',
    component: () => import('@/views/index.vue'),
    meta: {
      title: '数据大屏'
    }
  },
  {
    path: '/china',
    name: 'china',
    component: () => import('@/views/china.vue'),
    meta: {
      title: 'china'
    }
  },
  {
    path: '/3d',
    name: '3d',
    component: () => import('@/views/3d.vue'),
    meta: {
      title: '3d'
    }
  },
  {
    path: '/map',
    name: 'map',
    component: () => import('@/views/map.vue'),
    meta: {
      title: '数据大屏'
    }
  },
  {
    path: '/form',
    name: 'form',
    component: () => import('@/views/form.vue'),
    meta: {
      title: '数据大屏'
    }
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
